import request from '@/utils/request'
// import { makeFormData } from '@/utils/util'

const api = {
  // dirList: 'api/document_dir/list',
  recordUrl: 'api/otcourse/booking_record/list', // 签到列表
  signUrl: 'api/otcourse/booking_record', // 签名 预约
  deleteUrl: '/api/otcourse', // 删除
  docList: 'api/otcourse/list', // 列表接口
  docSubmit: 'api/otcourse' // 新增接口
}

// export function getDirList (params = {}) {
//   return request({
//     url: api.dirList,
//     method: 'get',
//     params
//   })
// }
export function signRequest (params = {}, method = 'post') {
  return request({
    url: api.signUrl,
    method,
    params
  })
}

export function getOtCourseList (params = {}) {
  return request({
    url: api.docList,
    method: 'get',
    params
  })
}

// export function dirSubmit (params = {}, method = 'post') {
//   return request({
//     url: api.dirSubmit,
//     method,
//     params
//   })
// }

export function docSubmit (params = {}, method = 'post') {
  return request({
    url: api.docSubmit,
    method,
    params
  })
}

export function deleteRequest (params = {}, method = 'post') {
  return request({
    url: api.deleteUrl,
    method,
    data: params
  })
}

export function recordRequest (params = {}) {
  return request({
    url: api.recordUrl,
    method: 'get',
    params
  })
}

